HATS HA provides a problem-alerting system that sends out alarms to designated people about any failure condition in
a network. To use HATS HA problem-alerting system, you need to write an
executible file to tell HATS HA
problem-alerting system when, where, and how to send the alarm. For example, when a standby machine takes over
a specified job, you probably want to notify the system administrator. Then you should make this clear in your
executible file.
HATS HA problem-alerting system operates through the <job>_start and <job>_stop scripts as described previously.
Each time HATS HA starts to service a job, it needs to execute the <job>_start script, and it executes the <job>_stop
script when the service stops. While
executing the <job>_start and <job>_stop scripts, HATS HA sends two
parameters to them: a. which machine (the originally designated service machine or the originally designated standby
machine) has started or stopped the service of a specified job; b. the reason why a machine has started or stopped the
service of a specified job. The second parameter is most useful in the <job>_stop script.
HATS HA problem-alerting system allows you to choose your own way of sending the alarm. For example, you can
choose to be called on a pager, to be notified through e-mail, or to view a message on your machine's monitor.
direct="/dev/term/b" phone="6122211661,,," code="428742" phone_end="#" start_stop=$1 job_type=$2 reason=$3 if [ $start_stop = 0 ]; then ..........if [ $job_type = 1 ]; then ..........# The service is shutdown, so we page. ...............echo atdt$phone$code$phone_end > $direct & ..........fi else ..........if [ $job_type = 0 ]; then ..........# The backup job is starting, so we page. ...............echo atdt$phone$code$phone_end > $direct & ..........fi fi |
#! /bin/sh if [ $1 = 1 ] then ..........echo Service stop reason $2 else ..........echo Standby stop reason $2 fi su oracle -c "/oracle/db_stop.sh" PATH=/oracle/bin:$PATH export PATH ORACLE_HOME=/oracle exportORACLE_HOME ORACLE_SID=db export ORACLE_SID tcpctl stop exit 0 |
#! /bin/sh if [ $1 = 1 ] then ..........echo Service stop reason $2 .........else echo Standby stop reason $2 .......... #invoke page_adm and pass 0(stop) to it ........../usr/HA/ha_file/page_adm 0 $1 $2fi su oracle -c "/oracle/db_stop.sh" PATH=/oracle/bin:$PATH export PATH ORACLE_HOME=/oracle exportORACLE_HOME ORACLE_SID=db export ORACLE_SID tcpctl stop exit 0 |
Table of Contents | Sec. 6-1 | Sec. 6-2 | Sec. 6- 3 | Sec. 6-4 | Sec. 6- 5 | Sec. 6-6 |
---|